var db = require('../db/db');
var util = require('util');

const tableName = 'core.data_category';

exports.getAll = async function () {

  var sql = `SELECT * FROM ${ tableName }`;
  let params = [];

  try {
    console.log(sql)
    var result = await db.runSql(sql, params);

    if (result) {
      return result.rows;
    }

    return null;

  } catch (e) {

    console.error("查询数据分类出错");
    return null;

  }

};
